<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<title>DynamoRIO API: Multi-Instrumentation Manager</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DynamoRIO API
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__drmgr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Multi-Instrumentation Manager</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct__drmgr__priority__t.html">_drmgr_priority_t</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga2f4d0660d151db533782a167a03a5696"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga2f4d0660d151db533782a167a03a5696">DRMGR_PRIORITY_NAME_CLS_ENTRY</a>&#160;&#160;&#160;&quot;drmgr_cls_entry&quot;</td></tr>
<tr class="memitem:ga3c1bc6cda7eaedf679cee9e207193ef3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga3c1bc6cda7eaedf679cee9e207193ef3">DRMGR_PRIORITY_NAME_CLS_EXIT</a>&#160;&#160;&#160;&quot;drmgr_cls_exit&quot;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga20cf573c904b2885a2b65d5d3db42847"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a> )(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating)</td></tr>
<tr class="memitem:ga01c9afbdf3843c508d1b4c486f2f4f19"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a> )(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating, OUT void **user_data)</td></tr>
<tr class="memitem:gacb8f7568c015abb3c26c78983bb7c533"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a></td></tr>
<tr class="memitem:ga434156c1ee1f2d695f8d897ede5afa50"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a> )(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating, void *user_data)</td></tr>
<tr class="memitem:ga17d7b1dae48792e4cc8b5b751850ac83"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a> )(void *drcontext, void *tag, instrlist_t *bb, <a class="el" href="structinstr__t.html">instr_t</a> *inst, bool for_trace, bool translating, void *user_data)</td></tr>
<tr class="memitem:ga85630d78f521678da499f26dc5cda5aa"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct__drmgr__priority__t.html">_drmgr_priority_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gae3531e42d6cde87d19a63801ab6b9230"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gae3531e42d6cde87d19a63801ab6b9230">drmgr_bb_phase_t</a> { <br/>
&#160;&#160;<a class="el" href="group__drmgr.html#ggae3531e42d6cde87d19a63801ab6b9230ae5168599a479256d3b95839f57e5b985">DRMGR_PHASE_NONE</a>, 
<br/>
&#160;&#160;<a class="el" href="group__drmgr.html#ggae3531e42d6cde87d19a63801ab6b9230a7eb5e7bcc7f6d533bcb8dcc10389441e">DRMGR_PHASE_APP2APP</a>, 
<br/>
&#160;&#160;<a class="el" href="group__drmgr.html#ggae3531e42d6cde87d19a63801ab6b9230a242a4f07729fd4b18c296263a7308faf">DRMGR_PHASE_ANALYSIS</a>, 
<br/>
&#160;&#160;<a class="el" href="group__drmgr.html#ggae3531e42d6cde87d19a63801ab6b9230a71f2ee3487696c6f969b06920b883dee">DRMGR_PHASE_INSERTION</a>, 
<br/>
&#160;&#160;<a class="el" href="group__drmgr.html#ggae3531e42d6cde87d19a63801ab6b9230ad4dab0dd27bdccf8b9d70727c9da5792">DRMGR_PHASE_INSTRU2INSTRU</a>
<br/>
 }</td></tr>
<tr class="memitem:ga0944a4353780132eeab7b06e3e42291d"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
&#160;&#160;<a class="el" href="group__drmgr.html#gga0944a4353780132eeab7b06e3e42291dadd063e5cb4ba9119fe2583d6088d7174">DRMGR_PRIORITY_INSERT_CLS_ENTRY</a> =  -500, 
<br/>
&#160;&#160;<a class="el" href="group__drmgr.html#gga0944a4353780132eeab7b06e3e42291da3ea29c4c2dcc8e8b7cabf5b39fd5c179">DRMGR_PRIORITY_INSERT_CLS_EXIT</a> =  5000
<br/>
 }</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga07ab03a2182247922f756778d18bb3fd"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga07ab03a2182247922f756778d18bb3fd">drmgr_init</a> (void)</td></tr>
<tr class="memitem:ga1e27214f63289548497d25c9e628a5d7"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga1e27214f63289548497d25c9e628a5d7">drmgr_exit</a> (void)</td></tr>
<tr class="memitem:gae270eeb1ab24d4e05f8588b23822f45c"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gae270eeb1ab24d4e05f8588b23822f45c">drmgr_register_bb_app2app_event</a> (<a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a> func, <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga22a83c67e54d71259e42b8e10abe62d6"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga22a83c67e54d71259e42b8e10abe62d6">drmgr_unregister_bb_app2app_event</a> (<a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a> func)</td></tr>
<tr class="memitem:ga83a5fc96944e10bd7356e0c492c93966"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga83a5fc96944e10bd7356e0c492c93966">drmgr_register_bb_instrumentation_event</a> (<a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a> analysis_func, <a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a> insertion_func, <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:gaff08fa96e523f613b7371835c5025422"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaff08fa96e523f613b7371835c5025422">drmgr_unregister_bb_instrumentation_event</a> (<a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a> func)</td></tr>
<tr class="memitem:ga2f1f4cb66a41c81a12a8b37ba96083de"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga2f1f4cb66a41c81a12a8b37ba96083de">drmgr_register_bb_instru2instru_event</a> (<a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a> func, <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga4c692eb44a082c09833d13ed85360814"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga4c692eb44a082c09833d13ed85360814">drmgr_unregister_bb_instru2instru_event</a> (<a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a> func)</td></tr>
<tr class="memitem:ga26e4be9f62ffd954f2f95ba21ec92953"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga26e4be9f62ffd954f2f95ba21ec92953">drmgr_register_bb_instrumentation_ex_event</a> (<a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a> app2app_func, <a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a> analysis_func, <a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a> insertion_func, <a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a> instru2instru_func, <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga6980f5fdc8f1f74ecaca53d0ef49c16a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga6980f5fdc8f1f74ecaca53d0ef49c16a">drmgr_unregister_bb_instrumentation_ex_event</a> (<a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a> app2app_func, <a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a> analysis_func, <a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a> insertion_func, <a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a> instru2instru_func)</td></tr>
<tr class="memitem:ga75f5e22831cb18cb7fbb8316cd56f09f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT <a class="el" href="group__drmgr.html#gae3531e42d6cde87d19a63801ab6b9230">drmgr_bb_phase_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga75f5e22831cb18cb7fbb8316cd56f09f">drmgr_current_bb_phase</a> (void *drcontext)</td></tr>
<tr class="memitem:ga512b4290d94b1874537e5b604cb27cab"><td class="memItemLeft" align="right" valign="top">DR_EXPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga512b4290d94b1874537e5b604cb27cab">drmgr_register_tls_field</a> (void)</td></tr>
<tr class="memitem:ga0389d904f0e656f8a8777d850e6187f3"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga0389d904f0e656f8a8777d850e6187f3">drmgr_unregister_tls_field</a> (int idx)</td></tr>
<tr class="memitem:gade57b8de9ed73d579044aa8f12abfe8d"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gade57b8de9ed73d579044aa8f12abfe8d">drmgr_get_tls_field</a> (void *drcontext, int idx)</td></tr>
<tr class="memitem:gac92542bc4f09040f3085079e68d60f66"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gac92542bc4f09040f3085079e68d60f66">drmgr_set_tls_field</a> (void *drcontext, int idx, void *value)</td></tr>
<tr class="memitem:ga7c72a35608998e6e359a3a652a7f97f7"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga7c72a35608998e6e359a3a652a7f97f7">drmgr_insert_read_tls_field</a> (void *drcontext, int idx, instrlist_t *ilist, <a class="el" href="structinstr__t.html">instr_t</a> *where, reg_id_t reg)</td></tr>
<tr class="memitem:ga65e2ae3d0f058fb069db7969e390c881"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga65e2ae3d0f058fb069db7969e390c881">drmgr_insert_write_tls_field</a> (void *drcontext, int idx, instrlist_t *ilist, <a class="el" href="structinstr__t.html">instr_t</a> *where, reg_id_t reg, reg_id_t scratch)</td></tr>
<tr class="memitem:ga933ff32be874004447af771283d0bcee"><td class="memItemLeft" align="right" valign="top">DR_EXPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field</a> (void(*cb_init_func)(void *drcontext, bool new_depth), void(*cb_exit_func)(void *drcontext, bool thread_exit))</td></tr>
<tr class="memitem:gaab638b9a9480b505e6ae323ffb72bb1d"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaab638b9a9480b505e6ae323ffb72bb1d">drmgr_unregister_cls_field</a> (void(*cb_init_func)(void *drcontext, bool new_depth), void(*cb_exit_func)(void *drcontext, bool thread_exit), int idx)</td></tr>
<tr class="memitem:ga67585e915e3f9b555ea4382ed6027812"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga67585e915e3f9b555ea4382ed6027812">drmgr_get_cls_field</a> (void *drcontext, int idx)</td></tr>
<tr class="memitem:ga5d3bc85402a8909c862d9c06d415f138"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga5d3bc85402a8909c862d9c06d415f138">drmgr_set_cls_field</a> (void *drcontext, int idx, void *value)</td></tr>
<tr class="memitem:gaba85528be6e0126b45a76245b6b4b001"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaba85528be6e0126b45a76245b6b4b001">drmgr_insert_read_cls_field</a> (void *drcontext, int idx, instrlist_t *ilist, <a class="el" href="structinstr__t.html">instr_t</a> *where, reg_id_t reg)</td></tr>
<tr class="memitem:gaa1d2757949d817bae787612177c00d85"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaa1d2757949d817bae787612177c00d85">drmgr_insert_write_cls_field</a> (void *drcontext, int idx, instrlist_t *ilist, <a class="el" href="structinstr__t.html">instr_t</a> *where, reg_id_t reg, reg_id_t scratch)</td></tr>
<tr class="memitem:gae2a70abba090ee410babc6a1548bb21d"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gae2a70abba090ee410babc6a1548bb21d">drmgr_push_cls</a> (void *drcontext)</td></tr>
<tr class="memitem:ga4ac55faa0a4274ab5d8ac1cbd247b569"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga4ac55faa0a4274ab5d8ac1cbd247b569">drmgr_pop_cls</a> (void *drcontext)</td></tr>
<tr class="memitem:ga4f53520da678e84fd7712e2fcca0182b"><td class="memItemLeft" align="right" valign="top">DR_EXPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga4f53520da678e84fd7712e2fcca0182b">drmgr_get_parent_cls_field</a> (void *drcontext, int idx)</td></tr>
<tr class="memitem:ga057f980fa9323a0bb8a4226c7c52c14a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT ptr_uint_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga057f980fa9323a0bb8a4226c7c52c14a">drmgr_reserve_note_range</a> (size_t size)</td></tr>
<tr class="memitem:ga357735ce7daa0bb717556455f20040a5"><td class="memItemLeft" align="right" valign="top">DR_EXPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga357735ce7daa0bb717556455f20040a5">drmgr_decode_sysnum_from_wrapper</a> (app_pc entry)</td></tr>
<tr class="memitem:gaaac050cf70682f6fcb8e28aa942705cd"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaaac050cf70682f6fcb8e28aa942705cd">drmgr_register_thread_init_event</a> (void(*func)(void *drcontext))</td></tr>
<tr class="memitem:ga835120bfe4726d59d13f8fbcd01fb264"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga835120bfe4726d59d13f8fbcd01fb264">drmgr_unregister_thread_init_event</a> (void(*func)(void *drcontext))</td></tr>
<tr class="memitem:ga2d3e4b9d9e8cff8e8ec01ef44392cfdd"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga2d3e4b9d9e8cff8e8ec01ef44392cfdd">drmgr_register_thread_exit_event</a> (void(*func)(void *drcontext))</td></tr>
<tr class="memitem:ga1a83a4ecf1b6172eab85e116aef96bea"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga1a83a4ecf1b6172eab85e116aef96bea">drmgr_unregister_thread_exit_event</a> (void(*func)(void *drcontext))</td></tr>
<tr class="memitem:gad4c1941a911a84b4f0ec60d2c37c6862"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gad4c1941a911a84b4f0ec60d2c37c6862">drmgr_register_pre_syscall_event</a> (bool(*func)(void *drcontext, int sysnum))</td></tr>
<tr class="memitem:ga5afd374b143bb438d486c60bdf7cbc4e"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga5afd374b143bb438d486c60bdf7cbc4e">drmgr_register_pre_syscall_event_ex</a> (bool(*func)(void *drcontext, int sysnum), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga7b437d862c741e995a75dc2d59ed6e43"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga7b437d862c741e995a75dc2d59ed6e43">drmgr_unregister_pre_syscall_event</a> (bool(*func)(void *drcontext, int sysnum))</td></tr>
<tr class="memitem:ga7070ea3233d022ebf272b43a3301d130"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga7070ea3233d022ebf272b43a3301d130">drmgr_register_post_syscall_event</a> (void(*func)(void *drcontext, int sysnum))</td></tr>
<tr class="memitem:ga06a8b25b80a61e09cacaee10b6e4ef06"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga06a8b25b80a61e09cacaee10b6e4ef06">drmgr_register_post_syscall_event_ex</a> (void(*func)(void *drcontext, int sysnum), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga79da54157fa3651e28dca9a9beda358a"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga79da54157fa3651e28dca9a9beda358a">drmgr_unregister_post_syscall_event</a> (void(*func)(void *drcontext, int sysnum))</td></tr>
<tr class="memitem:gaae5e551a1571aca43c136a83fe334096"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaae5e551a1571aca43c136a83fe334096">drmgr_register_module_load_event</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded))</td></tr>
<tr class="memitem:gaa14585b60c28600872f76b5e2939d638"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaa14585b60c28600872f76b5e2939d638">drmgr_register_module_load_event_ex</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga24be0b91d19115762643898a951d986e"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga24be0b91d19115762643898a951d986e">drmgr_unregister_module_load_event</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded))</td></tr>
<tr class="memitem:ga00e82d90a74f1f3bc87cfdaef45811c2"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga00e82d90a74f1f3bc87cfdaef45811c2">drmgr_register_module_unload_event</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info))</td></tr>
<tr class="memitem:ga852887c851db019e48cf00e232cf23ef"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga852887c851db019e48cf00e232cf23ef">drmgr_register_module_unload_event_ex</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga931bff986b8763df57f85b0f6cdfde58"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga931bff986b8763df57f85b0f6cdfde58">drmgr_unregister_module_unload_event</a> (void(*func)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info))</td></tr>
<tr class="memitem:ga984ae18ed26a72c84a0fcaaaf44e2343"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga984ae18ed26a72c84a0fcaaaf44e2343">drmgr_register_signal_event</a> (<a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo))</td></tr>
<tr class="memitem:ga81409344987ecb2ffcf08370d4a1145d"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga81409344987ecb2ffcf08370d4a1145d">drmgr_register_signal_event_ex</a> (<a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga617ad3a9ed87404feb3c6afe92b81ad6"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga617ad3a9ed87404feb3c6afe92b81ad6">drmgr_unregister_signal_event</a> (<a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo))</td></tr>
<tr class="memitem:gadd41d491993daae9eb5bc136a8971d09"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gadd41d491993daae9eb5bc136a8971d09">drmgr_register_exception_event</a> (bool(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt))</td></tr>
<tr class="memitem:gacf08ce7f3eab30d8c9aa0580840c569f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gacf08ce7f3eab30d8c9aa0580840c569f">drmgr_register_exception_event_ex</a> (bool(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga372a2681d2f9832639d5889f55132805"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga372a2681d2f9832639d5889f55132805">drmgr_unregister_exception_event</a> (bool(*func)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt))</td></tr>
<tr class="memitem:ga0ffa6aa4d9af18a42e98d15b4f82bb20"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga0ffa6aa4d9af18a42e98d15b4f82bb20">drmgr_register_restore_state_event</a> (void(*func)(void *drcontext, void *tag, <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *mcontext, bool restore_memory, bool app_code_consistent))</td></tr>
<tr class="memitem:gaf52f88ecf793967022bddd447c65e66f"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gaf52f88ecf793967022bddd447c65e66f">drmgr_register_restore_state_ex_event</a> (bool(*func)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info))</td></tr>
<tr class="memitem:gabbba95c12df79ff5b4ceab3c516ded92"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#gabbba95c12df79ff5b4ceab3c516ded92">drmgr_register_restore_state_ex_event_ex</a> (bool(*func)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info), <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *priority)</td></tr>
<tr class="memitem:ga55534858a00937feec337f7ca66c3c9e"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga55534858a00937feec337f7ca66c3c9e">drmgr_unregister_restore_state_event</a> (void(*func)(void *drcontext, void *tag, <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *mcontext, bool restore_memory, bool app_code_consistent))</td></tr>
<tr class="memitem:ga5f56b07ef2216961d6d01bd06bd907ec"><td class="memItemLeft" align="right" valign="top">DR_EXPORT bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__drmgr.html#ga5f56b07ef2216961d6d01bd06bd907ec">drmgr_unregister_restore_state_ex_event</a> (bool(*func)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info))</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="ga2f4d0660d151db533782a167a03a5696"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DRMGR_PRIORITY_NAME_CLS_ENTRY&#160;&#160;&#160;&quot;drmgr_cls_entry&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Name of drmgr insert pass priority for CLS entry tracking </p>

</div>
</div>
<a class="anchor" id="ga3c1bc6cda7eaedf679cee9e207193ef3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DRMGR_PRIORITY_NAME_CLS_EXIT&#160;&#160;&#160;&quot;drmgr_cls_exit&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Name of drmgr insert pass priority for CLS exit tracking </p>

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga01c9afbdf3843c508d1b4c486f2f4f19"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(* drmgr_analysis_cb_t)(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating, OUT void **user_data)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Callback function for the second stage: application analysis.</p>
<p>The <code>user_data</code> parameter can be used to pass data from this stage to the third stage.</p>
<p>See <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a> for an explanation of the return value. If any instrumentation pass requests DR_EMIT_STORE_TRANSLATIONS, they will be stored. </p>

</div>
</div>
<a class="anchor" id="gacb8f7568c015abb3c26c78983bb7c533"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a> <a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Callback function for the first stage when using a user data parameter: app2app transformations on instruction list. </p>

</div>
</div>
<a class="anchor" id="ga434156c1ee1f2d695f8d897ede5afa50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(* drmgr_ilist_ex_cb_t)(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating, void *user_data)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Callback function for the second and last stages when using a user data parameter for all four: analysis and instru2instru transformations on the whole instruction list.</p>
<p>See <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a> for an explanation of the return value. If any instrumentation pass requests DR_EMIT_STORE_TRANSLATIONS, they will be stored. </p>

</div>
</div>
<a class="anchor" id="ga17d7b1dae48792e4cc8b5b751850ac83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(* drmgr_insertion_cb_t)(void *drcontext, void *tag, instrlist_t *bb, <a class="el" href="structinstr__t.html">instr_t</a> *inst, bool for_trace, bool translating, void *user_data)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Callback function for the third stage: instrumentation insertion.</p>
<p>The <code>user_data</code> parameter contains data passed from the second stage to this stage.</p>
<p>See <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a> for an explanation of the return value. If any instrumentation pass requests DR_EMIT_STORE_TRANSLATIONS, they will be stored. </p>

</div>
</div>
<a class="anchor" id="ga85630d78f521678da499f26dc5cda5aa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct__drmgr__priority__t.html">_drmgr_priority_t</a>  <a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the ordering of callbacks for <code>drmgr's</code> events </p>

</div>
</div>
<a class="anchor" id="ga20cf573c904b2885a2b65d5d3db42847"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a>(* drmgr_xform_cb_t)(void *drcontext, void *tag, instrlist_t *bb, bool for_trace, bool translating)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Callback function for the first and last stages: app2app and instru2instru transformations on the whole instruction list.</p>
<p>See <a class="el" href="dr__events_8h.html#a689518ac5d1ad136b13e03012702b209">dr_emit_flags_t</a> for an explanation of the return value. If any instrumentation pass requests DR_EMIT_STORE_TRANSLATIONS, they will be stored. </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga0944a4353780132eeab7b06e3e42291d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Priority of drmgr instrumentation pass used to track CLS. Users of drmgr can use the names <a class="el" href="group__drmgr.html#ga2f4d0660d151db533782a167a03a5696">DRMGR_PRIORITY_NAME_CLS_ENTRY</a> or <a class="el" href="group__drmgr.html#ga3c1bc6cda7eaedf679cee9e207193ef3">DRMGR_PRIORITY_NAME_CLS_EXIT</a> in the <a class="el" href="struct__drmgr__priority__t.html#ac73be551eedc5f37043fb752b30eec32">drmgr_priority_t.before</a> field or can use these numeric priorities in the <a class="el" href="struct__drmgr__priority__t.html#a2e46fa4cbefc2dc32f3bc73e8bd82d3e">drmgr_priority_t.priority</a> field to ensure proper instrumentation pass ordering. The <a class="el" href="group__drmgr.html#gga0944a4353780132eeab7b06e3e42291dadd063e5cb4ba9119fe2583d6088d7174">DRMGR_PRIORITY_INSERT_CLS_ENTRY</a> should go before any client event and the <a class="el" href="group__drmgr.html#gga0944a4353780132eeab7b06e3e42291da3ea29c4c2dcc8e8b7cabf5b39fd5c179">DRMGR_PRIORITY_INSERT_CLS_EXIT</a> should go after any client event. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga0944a4353780132eeab7b06e3e42291dadd063e5cb4ba9119fe2583d6088d7174"></a>DRMGR_PRIORITY_INSERT_CLS_ENTRY</em>&nbsp;</td><td>
<p>Priority of CLS entry tracking </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0944a4353780132eeab7b06e3e42291da3ea29c4c2dcc8e8b7cabf5b39fd5c179"></a>DRMGR_PRIORITY_INSERT_CLS_EXIT</em>&nbsp;</td><td>
<p>Priority of CLS exit tracking </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="gae3531e42d6cde87d19a63801ab6b9230"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__drmgr.html#gae3531e42d6cde87d19a63801ab6b9230">drmgr_bb_phase_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Labels the current bb building phase </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggae3531e42d6cde87d19a63801ab6b9230ae5168599a479256d3b95839f57e5b985"></a>DRMGR_PHASE_NONE</em>&nbsp;</td><td>
<p>Not currently in a bb building event. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae3531e42d6cde87d19a63801ab6b9230a7eb5e7bcc7f6d533bcb8dcc10389441e"></a>DRMGR_PHASE_APP2APP</em>&nbsp;</td><td>
<p>Currently in the app2app phase. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae3531e42d6cde87d19a63801ab6b9230a242a4f07729fd4b18c296263a7308faf"></a>DRMGR_PHASE_ANALYSIS</em>&nbsp;</td><td>
<p>Currently in the analysis phase.. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae3531e42d6cde87d19a63801ab6b9230a71f2ee3487696c6f969b06920b883dee"></a>DRMGR_PHASE_INSERTION</em>&nbsp;</td><td>
<p>Currently in the instrumentation insertion phase. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggae3531e42d6cde87d19a63801ab6b9230ad4dab0dd27bdccf8b9d70727c9da5792"></a>DRMGR_PHASE_INSTRU2INSTRU</em>&nbsp;</td><td>
<p>Currently in the instru2instru phase. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga75f5e22831cb18cb7fbb8316cd56f09f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT <a class="el" href="group__drmgr.html#gae3531e42d6cde87d19a63801ab6b9230">drmgr_bb_phase_t</a> drmgr_current_bb_phase </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns which bb phase is the current one, if any. </p>

</div>
</div>
<a class="anchor" id="ga357735ce7daa0bb717556455f20040a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT int drmgr_decode_sysnum_from_wrapper </td>
          <td>(</td>
          <td class="paramtype">app_pc&#160;</td>
          <td class="paramname"><em>entry</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Given a system call wrapper routine <code>entry</code> of the Native API variety, decodes the routine and returns the system call number. Returns -1 on error. </p>

</div>
</div>
<a class="anchor" id="ga1e27214f63289548497d25c9e628a5d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT void drmgr_exit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cleans up the drmgr extension. </p>

</div>
</div>
<a class="anchor" id="ga67585e915e3f9b555ea4382ed6027812"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT void* drmgr_get_cls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the user-controlled callback-local-storage field for the given index, which was returned by <a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field()</a>. To generate an instruction sequence that reads the drcontext field inline in the code cache, use <a class="el" href="group__drmgr.html#gaba85528be6e0126b45a76245b6b4b001">drmgr_insert_read_cls_field()</a>. </p>

</div>
</div>
<a class="anchor" id="ga4f53520da678e84fd7712e2fcca0182b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT void* drmgr_get_parent_cls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the user-controlled callback-local-storage field for the given index, which was returned by <a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field()</a>, for the parent context (i.e., the context most recently pushed either by a Windows callback entry or a call to <a class="el" href="group__drmgr.html#gae2a70abba090ee410babc6a1548bb21d">drmgr_push_cls()</a>). If there is no parent context, returns NULL. </p>

</div>
</div>
<a class="anchor" id="gade57b8de9ed73d579044aa8f12abfe8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT void* drmgr_get_tls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the user-controlled thread-local-storage field for the given index, which was returned by <a class="el" href="group__drmgr.html#ga512b4290d94b1874537e5b604cb27cab">drmgr_register_tls_field()</a>. To generate an instruction sequence that reads the drcontext field inline in the code cache, use <a class="el" href="group__drmgr.html#ga7c72a35608998e6e359a3a652a7f97f7">drmgr_insert_read_tls_field()</a>. </p>

</div>
</div>
<a class="anchor" id="ga07ab03a2182247922f756778d18bb3fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the drmgr extension. Must be called prior to any of the other routines. Can be called multiple times (by separate components, normally) but each call must be paired with a corresponding call to <a class="el" href="group__drmgr.html#ga1e27214f63289548497d25c9e628a5d7">drmgr_exit()</a>.</p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaba85528be6e0126b45a76245b6b4b001"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_insert_read_cls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">instrlist_t *&#160;</td>
          <td class="paramname"><em>ilist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structinstr__t.html">instr_t</a> *&#160;</td>
          <td class="paramname"><em>where</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>reg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Inserts into <code>ilist</code> prior to <code>where</code> meta-instruction(s) to read into the general-purpose full-size register <code>reg</code> from the user-controlled drcontext field for the current (at execution time) callback and index. Reads from the same field as <a class="el" href="group__drmgr.html#ga67585e915e3f9b555ea4382ed6027812">drmgr_get_cls_field()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7c72a35608998e6e359a3a652a7f97f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_insert_read_tls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">instrlist_t *&#160;</td>
          <td class="paramname"><em>ilist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structinstr__t.html">instr_t</a> *&#160;</td>
          <td class="paramname"><em>where</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>reg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Inserts into <code>ilist</code> prior to <code>where</code> meta-instruction(s) to read into the general-purpose full-size register <code>reg</code> from the user-controlled drcontext field for this thread and index. Reads from the same field as <a class="el" href="group__drmgr.html#gade57b8de9ed73d579044aa8f12abfe8d">drmgr_get_tls_field()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa1d2757949d817bae787612177c00d85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_insert_write_cls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">instrlist_t *&#160;</td>
          <td class="paramname"><em>ilist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structinstr__t.html">instr_t</a> *&#160;</td>
          <td class="paramname"><em>where</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>scratch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Inserts into <code>ilist</code> prior to <code>where</code> meta-instruction(s) to write the general-purpose full-size register <code>reg</code> to the user-controlled drcontext field for the current (at execution time) callback and index. Writes to the same field as <a class="el" href="group__drmgr.html#ga5d3bc85402a8909c862d9c06d415f138">drmgr_set_cls_field()</a>. The register <code>scratch</code> will be overwritten. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga65e2ae3d0f058fb069db7969e390c881"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_insert_write_tls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">instrlist_t *&#160;</td>
          <td class="paramname"><em>ilist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structinstr__t.html">instr_t</a> *&#160;</td>
          <td class="paramname"><em>where</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">reg_id_t&#160;</td>
          <td class="paramname"><em>scratch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Inserts into <code>ilist</code> prior to <code>where</code> meta-instruction(s) to write the general-purpose full-size register <code>reg</code> to the user-controlled drcontext field for this thread and index. Writes to the same field as <a class="el" href="group__drmgr.html#gac92542bc4f09040f3085079e68d60f66">drmgr_set_tls_field()</a>. The register <code>scratch</code> will be overwritten. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4ac55faa0a4274ab5d8ac1cbd247b569"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_pop_cls </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pops a callback context from the callback-local storage (cls) context stack for the given thread. This function is automatically called on exit from a Windows callback. Users can invoke it to provide context stacks for their own uses, including Linux signals or layered wrapped functions. Invoking this function will trigger the <code>cb_exit_func</code> passed to <a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field()</a>.</p>
<p>Returns false if the context stack has only one entry. </p>

</div>
</div>
<a class="anchor" id="gae2a70abba090ee410babc6a1548bb21d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_push_cls </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Pushes a new callback context onto the callback-local storage (cls) context stack for the given thread. This function is automatically called on entry to a new Windows callback. Users can invoke it to provide context stacks for their own uses, including Linux signals or layered wrapped functions. Invoking this function will trigger the <code>cb_init_func</code> passed to <a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gae270eeb1ab24d4e05f8588b23822f45c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_bb_app2app_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a>&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the first instrumentation stage: application-to-application ("app2app") transformations on each basic block. drmgr will call <code>func</code> as the first of four instrumentation stages for each dynamic application basic block. Examples of app2app transformations include replacing one function with another or replacing one instruction with another throughout an application.</p>
<p>The app2app passes are allowed to modify and insert non-meta (i.e., application) instructions and are intended for application code transformations. These passes should avoid adding meta instructions other than label instructions.</p>
<p>All instrumentation must follow the guidelines for <a class="el" href="dr__events_8h.html#a043a3588c4cf0c2d6838140fce530e72">dr_register_bb_event()</a> with the exception that multiple application control transfer instructions are supported so long as all but one have intra-block <code><a class="el" href="structinstr__t.html">instr_t</a></code> targets. This is to support internal control flow that may be necessary for some application-to-application transformations. These control transfer instructions should have a translation set so that later passes know which application address they correspond to. <code>drmgr</code> will mark all of the extra non-meta control transfers as meta, and clear their translation fields, right before passing to DynamoRIO, in order to satisfy DynamoRIO's constraints. This allows all of the instrumentation passes to see these instructions as application instructions, which is how they should be treated.</p>
<dl class="section return"><dt>Returns:</dt><dd>false if the given priority request cannot be satisfied (e.g., <code>priority-&gt;before</code> is already ordered after <code>priority-&gt;after</code>) or the given name is already taken.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The callback to be called. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">priority</td><td>Specifies the relative ordering of the callback. Can be NULL, in which case a default priority is used. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2f1f4cb66a41c81a12a8b37ba96083de"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_bb_instru2instru_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a>&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the fourth instrumentation stage: instrumentation-to-instrumentation transformations on each basic block. drmgr will call <code>func</code> as the fourth of four instrumentation stages for each dynamic application basic block. Instrumentation-to-instrumentation passes are allowed to insert meta instructions but not non-meta instructions, and are intended for optimization of prior instrumentation passes.</p>
<p>All instrumentation must follow the guidelines for <a class="el" href="dr__events_8h.html#a043a3588c4cf0c2d6838140fce530e72">dr_register_bb_event()</a>.</p>
<dl class="section return"><dt>Returns:</dt><dd>false if the given priority request cannot be satisfied (e.g., <code>priority-&gt;before</code> is already ordered after <code>priority-&gt;after</code>) or the given name is already taken.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>The callback to be called. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">priority</td><td>Specifies the relative ordering of the callback. Can be NULL, in which case a default priority is used. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga83a5fc96944e10bd7356e0c492c93966"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_bb_instrumentation_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a>&#160;</td>
          <td class="paramname"><em>analysis_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a>&#160;</td>
          <td class="paramname"><em>insertion_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers callback functions for the second and third instrumentation stages: application analysis and instrumentation insertion. drmgr will call <code>func</code> as the second of four instrumentation stages for each dynamic application basic block.</p>
<p>The first stage performed any changes to the original application code, and later stages are not allowed to change application code. Application analysis passes in the second stage are not allowed to add to or change the instruction list other than adding label instructions, and are intended for analysis of application code either for immediate use or for use by the third stage. Label instructions can be used to store data for use in subsequent stages with custom tags inserted as notes via <a class="el" href="group__drmgr.html#ga057f980fa9323a0bb8a4226c7c52c14a">drmgr_reserve_note_range()</a> and custom data stored via <a class="el" href="dr__ir__instr_8h.html#a7eab5eaa85e186349d200a87e8010fec">instr_get_label_data_area()</a>.</p>
<p>The third instrumentation stage is instrumentation insertion. Unlike the other stages, this one passes only one instruction to the callback, allowing each registered component to act on one instruction before moving to the next instruction. Instrumentation insertion passes are allowed to insert meta instructions only immediately prior to the passed-in instruction: not before any prior non-meta instrution nor after any subsequent non-meta instruction. They are not allowed to insert new non-meta instructions or change existing non-meta instructions. Because other components may have alread acted on the instruction list, be sure to ignore already existing meta instructions.</p>
<p>The <code>analysis_func</code> and <code>insertion_func</code> share the same priority. Their user_data parameter can be used to pass data from the analysis stage to the insertion stage.</p>
<p>All instrumentation must follow the guidelines for <a class="el" href="dr__events_8h.html#a043a3588c4cf0c2d6838140fce530e72">dr_register_bb_event()</a>.</p>
<dl class="section return"><dt>Returns:</dt><dd>false if the given priority request cannot be satisfied (e.g., <code>priority-&gt;before</code> is already ordered after <code>priority-&gt;after</code>) or the given name is already taken.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">analysis_func</td><td>The analysis callback to be called for the second stage. Can be NULL if insertion_func is non-NULL, in which case the user_data passed to insertion_func is NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">insertion_func</td><td>The insertion callback to be called for the third stage. Can be NULL if analysis_func is non-NULL. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">priority</td><td>Specifies the relative ordering of both callbacks. Can be NULL, in which case a default priority is used.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note:</dt><dd>It is possible for meta instructions to be present and passed to the analysis and/or insertion stages, if they were added in the app2app or analysis stages. While this is discouraged, it is sometimes unavoidable, such as for <a class="el" href="group__drwrap.html#ga0ae2e383b0005a46848c7d0497be563a">drwrap_replace_native()</a>. We recommend that all instrumentation stages check for meta instructions (and ignore them, typically). </dd></dl>

</div>
</div>
<a class="anchor" id="ga26e4be9f62ffd954f2f95ba21ec92953"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_bb_instrumentation_ex_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>app2app_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>analysis_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a>&#160;</td>
          <td class="paramname"><em>insertion_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>instru2instru_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers callbacks for all four instrumentation passes at once, with a <code>user_data</code> parameter passed among them all, enabling data sharing for all four. See the documentation for <a class="el" href="group__drmgr.html#gae270eeb1ab24d4e05f8588b23822f45c">drmgr_register_bb_app2app_event()</a>, <a class="el" href="group__drmgr.html#ga83a5fc96944e10bd7356e0c492c93966">drmgr_register_bb_instrumentation_event()</a>, and <a class="el" href="group__drmgr.html#ga2f1f4cb66a41c81a12a8b37ba96083de">drmgr_register_bb_instru2instru_event()</a> for further details of each pass. The aforemented routines are identical to this with the exception of the extra <code>user_data</code> parameter, which is an OUT parameter to the <code>app2app_func</code> and passed in to the three subsequent callbacks. The <code>priority</code> param can be NULL, in which case a default priority is used. </p>

</div>
</div>
<a class="anchor" id="ga933ff32be874004447af771283d0bcee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT int drmgr_register_cls_field </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, bool new_depth)&#160;</td>
          <td class="paramname"><em>cb_init_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *drcontext, bool thread_exit)&#160;</td>
          <td class="paramname"><em>cb_exit_func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reserves a callback-local storage (cls) slot. Thread-local storage (tls) is callback-shared. Callbacks interrupt thread execution to execute arbitrary amounts of code in a new context before returning to the interrupted context. Thread-local storage fields that persist across application execution can be overwritten during callback execution, resulting in incorrect values when returning to the original context. Callback-local storage, rather than thread-local storage, should be used for any fields that store information specific to the application's execution.</p>
<p>Returns the index of the slot, which should be passed to <a class="el" href="group__drmgr.html#ga67585e915e3f9b555ea4382ed6027812">drmgr_get_cls_field()</a> and <a class="el" href="group__drmgr.html#ga5d3bc85402a8909c862d9c06d415f138">drmgr_set_cls_field()</a>. Returns -1 if there are no more slots available.</p>
<p>Callbacks are frequent, but normally the stack of callback contexts is only a few entries deep. It is most efficient to re-use cls data from prior callbacks, only allocating new memory when entering a new context stack depth. The <code>cb_init_func</code> parameter is invoked on each new callback context, with <code>new_depth</code> set to true only when entering a new callback context stack depth. When <code>new_depth</code> is false, <a class="el" href="group__drmgr.html#ga67585e915e3f9b555ea4382ed6027812">drmgr_get_cls_field()</a> will return the value set at that depth the last time it was reached, and the client would normally not need to allocate memory but would only need to initialize it. When <code>new_depth</code> is true, <a class="el" href="group__drmgr.html#ga67585e915e3f9b555ea4382ed6027812">drmgr_get_cls_field()</a> will return NULL, and the user should use <a class="el" href="group__drmgr.html#ga5d3bc85402a8909c862d9c06d415f138">drmgr_set_cls_field()</a> to initialize the slot itself as well as whatever it points to.</p>
<p>Similarly, normal usage should ignore <code>cb_exit_func</code> unless it is called with <code>thread_exit</code> set to true, in which case any memory in the cls slot should be de-allocated.</p>
<p>Callbacks are Windows-specific. The cls interfaces are not marked for Windows-only, however, to facilitate cross-platform code. We recommend that cross-plaform code be written using cls fields on both platforms; the fields on Linux will never be stacked and will function as tls fields. Technically the same context interruption can occur with a Linux signal, but Linux signals typically execute small amounts of code and avoid making stateful changes; furthermore, there is no guaranteed end point to a signal. The <a class="el" href="group__drmgr.html#gae2a70abba090ee410babc6a1548bb21d">drmgr_push_cls()</a> and <a class="el" href="group__drmgr.html#ga4ac55faa0a4274ab5d8ac1cbd247b569">drmgr_pop_cls()</a> interface can be used to provide a stack of contexts on Linux, or to provide a stack of contexts for any other purpose such as layered wrapped functions. These push and pop functions are automatically called on Windows callback entry and exit. </p>

</div>
</div>
<a class="anchor" id="gadd41d491993daae9eb5bc136a8971d09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_exception_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the exception event, which behaves just like DR's exception event <a class="el" href="dr__events_8h.html#a69adae9409a1871149da69e97747b84c">dr_register_exception_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gacf08ce7f3eab30d8c9aa0580840c569f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_exception_event_ex </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the exception event, which behaves just like DR's exception event <a class="el" href="dr__events_8h.html#a69adae9409a1871149da69e97747b84c">dr_register_exception_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#gadd41d491993daae9eb5bc136a8971d09">drmgr_register_exception_event()</a>. Just like for DR, the first callback to return false will short-circuit event delivery to later callbacks. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaae5e551a1571aca43c136a83fe334096"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_module_load_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the module load event, which behaves just like DR's module load event <a class="el" href="dr__events_8h.html#aca6b098123ef80cae05ce767a7dd9d98">dr_register_module_load_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa14585b60c28600872f76b5e2939d638"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_module_load_event_ex </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the module load event, which behaves just like DR's module load event <a class="el" href="dr__events_8h.html#aca6b098123ef80cae05ce767a7dd9d98">dr_register_module_load_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#gaae5e551a1571aca43c136a83fe334096">drmgr_register_module_load_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga00e82d90a74f1f3bc87cfdaef45811c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_module_unload_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the module unload event, which behaves just like DR's module unload event <a class="el" href="dr__events_8h.html#a2a40613f5e73d800acaeadd400bb1fab">dr_register_module_unload_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga852887c851db019e48cf00e232cf23ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_module_unload_event_ex </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the module unload event, which behaves just like DR's module unload event <a class="el" href="dr__events_8h.html#a2a40613f5e73d800acaeadd400bb1fab">dr_register_module_unload_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#ga00e82d90a74f1f3bc87cfdaef45811c2">drmgr_register_module_unload_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7070ea3233d022ebf272b43a3301d130"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_post_syscall_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the post-syscall event, which behaves just like DR's post-syscall event <a class="el" href="dr__events_8h.html#a099441f8d147404355c66178e3b19f0f">dr_register_post_syscall_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga06a8b25b80a61e09cacaee10b6e4ef06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_post_syscall_event_ex </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the post-syscall event, which behaves just like DR's post-syscall event <a class="el" href="dr__events_8h.html#a099441f8d147404355c66178e3b19f0f">dr_register_post_syscall_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#ga7070ea3233d022ebf272b43a3301d130">drmgr_register_post_syscall_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gad4c1941a911a84b4f0ec60d2c37c6862"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_pre_syscall_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the pre-syscall event, which behaves just like DR's pre-syscall event <a class="el" href="dr__events_8h.html#aa37d61a7f9dde4663b8dd4c3a44732f4">dr_register_pre_syscall_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga5afd374b143bb438d486c60bdf7cbc4e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_pre_syscall_event_ex </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the pre-syscall event, which behaves just like DR's pre-syscall event <a class="el" href="dr__events_8h.html#aa37d61a7f9dde4663b8dd4c3a44732f4">dr_register_pre_syscall_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#gad4c1941a911a84b4f0ec60d2c37c6862">drmgr_register_pre_syscall_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga0ffa6aa4d9af18a42e98d15b4f82bb20"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_restore_state_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, void *tag, <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *mcontext, bool restore_memory, bool app_code_consistent)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the restore state event, which behaves just like DR's restore state event <a class="el" href="dr__events_8h.html#ae7a179ac7a2d01157e1ab2852f50c902">dr_register_restore_state_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf52f88ecf793967022bddd447c65e66f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_restore_state_ex_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the restore state extended event, which behaves just like DR's restore state event <a class="el" href="dr__events_8h.html#a000e59a3f500a2d4a1d0123ce6032f77">dr_register_restore_state_ex_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gabbba95c12df79ff5b4ceab3c516ded92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_restore_state_ex_event_ex </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the restore state extended event, which behaves just like DR's restore state event <a class="el" href="dr__events_8h.html#a000e59a3f500a2d4a1d0123ce6032f77">dr_register_restore_state_ex_event()</a>, except that it is ordered according to <code>priority</code> among both extended and regular callbacks. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#ga0ffa6aa4d9af18a42e98d15b4f82bb20">drmgr_register_restore_state_event()</a> or <a class="el" href="group__drmgr.html#gaf52f88ecf793967022bddd447c65e66f">drmgr_register_restore_state_ex_event()</a>. Just like for DR, the first callback to return false will short-circuit event delivery to later callbacks. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga984ae18ed26a72c84a0fcaaaf44e2343"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_signal_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the signal event, which behaves just like DR's signal event <a class="el" href="dr__events_8h.html#a3ac512c0bd9feea08cb04dd923efb589">dr_register_signal_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga81409344987ecb2ffcf08370d4a1145d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_signal_event_ex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo)&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga85630d78f521678da499f26dc5cda5aa">drmgr_priority_t</a> *&#160;</td>
          <td class="paramname"><em>priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the signal event, which behaves just like DR's signal event <a class="el" href="dr__events_8h.html#a3ac512c0bd9feea08cb04dd923efb589">dr_register_signal_event()</a>, except that it is ordered according to <code>priority</code>. A default priority of 0 is used for events registered via <a class="el" href="group__drmgr.html#ga984ae18ed26a72c84a0fcaaaf44e2343">drmgr_register_signal_event()</a>. Just like for DR, the first callback to return other than DR_SIGNAL_DELIVER will short-circuit event delivery to later callbacks. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga2d3e4b9d9e8cff8e8ec01ef44392cfdd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_thread_exit_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the thread exit event. drmgr calls <code>func</code> whenever DR would, when an application thread exits. All the constraints of <a class="el" href="dr__events_8h.html#a0b0c102bb9a99d67c3e62ea8b3790ff1">dr_register_thread_exit_event()</a> apply. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gaaac050cf70682f6fcb8e28aa942705cd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_register_thread_init_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Registers a callback function for the thread initialization event. drmgr calls <code>func</code> whenever the application creates a new thread. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga512b4290d94b1874537e5b604cb27cab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT int drmgr_register_tls_field </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reserves a thread-local storage (tls) slot for every thread. Returns the index of the slot, which should be passed to <a class="el" href="group__drmgr.html#gade57b8de9ed73d579044aa8f12abfe8d">drmgr_get_tls_field()</a> and <a class="el" href="group__drmgr.html#gac92542bc4f09040f3085079e68d60f66">drmgr_set_tls_field()</a>. Returns -1 if there are no more slots available. Each slot is initialized to NULL for each thread and should be properly initialized with <a class="el" href="group__drmgr.html#gac92542bc4f09040f3085079e68d60f66">drmgr_set_tls_field()</a> in the thread initialization event (see <a class="el" href="dr__events_8h.html#a878920c40c76e2c18043f9db772a24c0">dr_register_thread_init_event()</a>). </p>

</div>
</div>
<a class="anchor" id="ga057f980fa9323a0bb8a4226c7c52c14a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT ptr_uint_t drmgr_reserve_note_range </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reserves <code>size</code> values in the namespace for use in the <code>note</code> field of instructions. The reserved range starts at the return value and is contiguous. Returns DRMGR_NOTE_NONE on failure. Un-reserving is not supported. </p>

</div>
</div>
<a class="anchor" id="ga5d3bc85402a8909c862d9c06d415f138"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_set_cls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the user-controlled callback-local-storage field for the given index, which was returned by <a class="el" href="group__drmgr.html#ga933ff32be874004447af771283d0bcee">drmgr_register_cls_field()</a>. To generate an instruction sequence that writes the drcontext field inline in the code cache, use <a class="el" href="group__drmgr.html#gaa1d2757949d817bae787612177c00d85">drmgr_insert_write_cls_field()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="gac92542bc4f09040f3085079e68d60f66"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_set_tls_field </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>drcontext</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the user-controlled thread-local-storage field for the given index, which was returned by <a class="el" href="group__drmgr.html#ga512b4290d94b1874537e5b604cb27cab">drmgr_register_tls_field()</a>. To generate an instruction sequence that writes the drcontext field inline in the code cache, use <a class="el" href="group__drmgr.html#ga65e2ae3d0f058fb069db7969e390c881">drmgr_insert_write_tls_field()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>whether successful. </dd></dl>

</div>
</div>
<a class="anchor" id="ga22a83c67e54d71259e42b8e10abe62d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_bb_app2app_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a>&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregisters a callback function for the first instrumentation stage. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered).</dd></dl>
<p>The recommendations for <a class="el" href="dr__events_8h.html#ac10e7ca1490fc450cab526c335693314">dr_unregister_bb_event()</a> about when it is safe to unregister apply here as well. </p>

</div>
</div>
<a class="anchor" id="ga4c692eb44a082c09833d13ed85360814"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_bb_instru2instru_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga20cf573c904b2885a2b65d5d3db42847">drmgr_xform_cb_t</a>&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregisters a callback function for the fourth instrumentation stage. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered).</dd></dl>
<p>The recommendations for <a class="el" href="dr__events_8h.html#ac10e7ca1490fc450cab526c335693314">dr_unregister_bb_event()</a> about when it is safe to unregister apply here as well. </p>

</div>
</div>
<a class="anchor" id="gaff08fa96e523f613b7371835c5025422"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_bb_instrumentation_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga01c9afbdf3843c508d1b4c486f2f4f19">drmgr_analysis_cb_t</a>&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregisters <code>func</code> and its corresponding insertion callback from the second and third instrumentation stages. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered).</dd></dl>
<p>The recommendations for <a class="el" href="dr__events_8h.html#ac10e7ca1490fc450cab526c335693314">dr_unregister_bb_event()</a> about when it is safe to unregister apply here as well. </p>

</div>
</div>
<a class="anchor" id="ga6980f5fdc8f1f74ecaca53d0ef49c16a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_bb_instrumentation_ex_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#gacb8f7568c015abb3c26c78983bb7c533">drmgr_app2app_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>app2app_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>analysis_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga17d7b1dae48792e4cc8b5b751850ac83">drmgr_insertion_cb_t</a>&#160;</td>
          <td class="paramname"><em>insertion_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__drmgr.html#ga434156c1ee1f2d695f8d897ede5afa50">drmgr_ilist_ex_cb_t</a>&#160;</td>
          <td class="paramname"><em>instru2instru_func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregisters the given four callbacks that were registered via <a class="el" href="group__drmgr.html#ga26e4be9f62ffd954f2f95ba21ec92953">drmgr_register_bb_instrumentation_ex_event()</a>. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered).</dd></dl>
<p>The recommendations for <a class="el" href="dr__events_8h.html#ac10e7ca1490fc450cab526c335693314">dr_unregister_bb_event()</a> about when it is safe to unregister apply here as well. </p>

</div>
</div>
<a class="anchor" id="gaab638b9a9480b505e6ae323ffb72bb1d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_cls_field </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, bool new_depth)&#160;</td>
          <td class="paramname"><em>cb_init_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *drcontext, bool thread_exit)&#160;</td>
          <td class="paramname"><em>cb_exit_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Frees a previously reserved callback-local storage (cls) slot index and unregisters its event callbacks. Returns false if the slot was not actually reserved. </p>

</div>
</div>
<a class="anchor" id="ga372a2681d2f9832639d5889f55132805"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_exception_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, <a class="el" href="dr__events_8h.html#adebe39e781c20b42f61c7d03ed560587">dr_exception_t</a> *excpt)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the exception event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga24be0b91d19115762643898a951d986e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_module_load_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info, bool loaded)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the module load event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga931bff986b8763df57f85b0f6cdfde58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_module_unload_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, const <a class="el" href="struct__module__data__t.html">module_data_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the module unload event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga79da54157fa3651e28dca9a9beda358a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_post_syscall_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the post-syscall event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga7b437d862c741e995a75dc2d59ed6e43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_pre_syscall_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, int sysnum)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the pre-syscall event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga55534858a00937feec337f7ca66c3c9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_restore_state_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext, void *tag, <a class="el" href="dr__defines_8h.html#a5d50a4225e834d67f66438669608e435">dr_mcontext_t</a> *mcontext, bool restore_memory, bool app_code_consistent)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the restore state event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga5f56b07ef2216961d6d01bd06bd907ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_restore_state_ex_event </td>
          <td>(</td>
          <td class="paramtype">bool(*)(void *drcontext, bool restore_memory, <a class="el" href="dr__events_8h.html#a19a4bd60d7607be81d77f466fd8d7f49">dr_restore_state_info_t</a> *info)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the restore state extended event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga617ad3a9ed87404feb3c6afe92b81ad6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_signal_event </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="dr__events_8h.html#af86ce68b89c76d46c92d36e58ddb7a33">dr_signal_action_t</a>(*)(void *drcontext, <a class="el" href="dr__events_8h.html#ab49900139eb46d5dde3b2b69c175c072">dr_siginfo_t</a> *siginfo)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the signal event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga1a83a4ecf1b6172eab85e116aef96bea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_thread_exit_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the thread exit event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga835120bfe4726d59d13f8fbcd01fb264"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_thread_init_event </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *drcontext)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unregister a callback function for the thread initialization event. </p>
<dl class="section return"><dt>Returns:</dt><dd>true if unregistration is successful and false if it is not (e.g., <code>func</code> was not registered). </dd></dl>

</div>
</div>
<a class="anchor" id="ga0389d904f0e656f8a8777d850e6187f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DR_EXPORT bool drmgr_unregister_tls_field </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Frees a previously reserved thread-local storage (tls) slot index. Returns false if the slot was not actually reserved. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer" style="float:none;text-align:center"><img border=0 src="favicon.png"> &nbsp;  DynamoRIO API version 5.0.0 --- Wed Sep 10 2014 21:36:44 &nbsp; <img border=0 src="favicon.png">
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
